/**
 * 所有自定义指令集合
 */
import Vue from 'vue'

Vue.directive('loginInputWrapper', {
  bind: function (el, binding) {
    el.style.height = '33px'
    el.style.lineHeight = '33px'
    el.style.marginBottom = '9px'
    el.style.backgroundColor = '#EFEFEF'
    el.style.border = '1px solid #E2E2E2'
    el.style.borderRadius = '4px'
  },
  update (el, binding, vnode) {
    // el.style.border = !binding.value ? '1px solid red' : '1px solid #E2E2E2'
    // console.log(binding.value)
  }
})

Vue.directive('loginInput', {
  bind (el, binding) {
    el.style.width = '100%'
    el.style.backgroundColor = '#efefef'
    el.style.border = 'none'
    el.style.fontFamily = '微软雅黑'
    el.style.outline = 0 // 去掉鼠标点击之后自带边框
  }
})

Vue.directive('webMinWidth', { // 底层容器最小宽度
  bind (el, binding) {
    el.style.minWidth = '1200px'
    el.style.overflowX = 'auto'
  }
})

export default Vue
